{:W('Header')}
<if condition="$data.goods ">
    <script type="text/javascript">
        $(function () {
            $(".mui-tab li").hover(function () {
                $(this).addClass("on");
                $(this).find(".left_conts").css("display", "block").stop(true, false).animate({
                    "right": 35,
                    "opacity": 1
                }, 200);
            }, function () {
                $(this).removeClass("on");
                $(this).find(".left_conts").stop(true, false).animate({"right": 70, "opacity": 0}, 200, function () {
                    $(this).hide();
                });


            });

            $(".logo-qrcode").hover(function () {
                $(this).children(".mui-mbarp-qrcode-tip").css("visibility", "visible");
            }, function () {
                $(this).children(".mui-mbarp-qrcode-tip").css("visibility", "hidden");
            });

        });
        var h = $(".Floatright_box").height();
        $(".Floatright_box").css({"margin-top": -h / 2});
    </script>
    <script>
        $(function () {
            isIe6 = false;
            if ('undefined' == typeof(document.body.style.maxHeight)) {
                isIe6 = true;
            }
            var offset = $("#topcontrol2").offset();
            var bottom = $("#topcontrol2").css("bottom");
            $(window).scroll(function () {
                if ($(window).scrollTop() > 500) {
                    $("#topcontrol2").fadeIn(800);
                    if (isIe6) {
                        $("#topcontrol2").css("position", "absolute")
                        $("#topcontrol2").css("bottom", bottom)
                    }
                }
                else {
                    $("#topcontrol2").fadeOut(500);
                }
            });
            $("#topcontrol2,#sider_returntop2").click(function () {
                $('body,html').animate({scrollTop: 0}, 500);
                return false;
            });
        })
    </script>
    <div class="content_c">
        <div class="searchBody block">
            <div class="crumbSlide ">
                <div class="title_left">
                    <div id="ur_here">
                        <if condition="$cateArr">
                            <span></span> <a href="{:U('/Index')}">首页</a>
                            <foreach name="cateArr" item="v" key="k">
                                <code>&gt;</code> <a
                                    href="{:U(GROUP_NAME.'/Goods/showList',array('cate_id'=>$v['id']))}">{$v.cate_name}</a>
                            </foreach>
                        </if>
                    </div>
                </div>
            </div>
            <div class="block clearfix" style="margin:0 auto">
                <div class="">
                    <script>
                        function show_box(this_obj, h) {
                            var child_obj = this_obj.parentNode.parentNode.childNodes;
                            for (i = 0; i < child_obj.length; i++) {
                                if (child_obj[i].className == "show_box") {
                                    if (child_obj[i].style.height != "auto") {
                                        child_obj[i].style.height = "auto";
                                        this_obj.innerText = "收起";
                                    }
                                    else {
                                        child_obj[i].style.height = h + 'px';
                                        this_obj.innerText = "更多";
                                    }
                                }
                            }
                        }
                    </script>
                    <div class="searchRight_title">
                        <if condition="!$data.search ">
                            <div class="rightTitle_left">
                                <form method="GET" class="sort" name="listform">
                                    <div class="f_l">
                                        <a style="border-right:#ccc solid 1px; height:22px; float:left; width:44px;"
                                           href="category.php?category=1&display=grid&brand=0&price_min=0&price_max=0&filter_attr=0&page=1&sort=goods_id&order=ASC#goods_list"><img
                                                style="margin-left:0px" src="__PUBLIC__/Images/images/goods_id_DESC.gif"
                                                alt="按上架时间排序"></a>
                                        <a style="border-right:#ccc solid 1px; height:22px; float:left; width:44px;"
                                           href="category.php?category=1&display=grid&brand=0&price_min=0&price_max=0&filter_attr=0&page=1&sort=last_update&order=DESC#goods_list"><img
                                                src="__PUBLIC__/Images/images/last_update_default.gif"
                                                alt="按更新时间排序"></a>
                                        <a style="border-right:#ccc solid 1px; height:22px; float:left; width:44px;"
                                           href="category.php?category=1&display=grid&brand=0&price_min=0&price_max=0&filter_attr=0&page=1&sort=sales_volume&order=DESC#goods_list"><img
                                                style="margin-left:0px" src="__PUBLIC__/Images/images/sales_default.gif"
                                                alt="按销量排序"></a>
                                        <a style="border-right:#ccc solid 1px; height:22px; float:left; width:44px;"
                                           href="category.php?category=1&display=grid&brand=0&price_min=0&price_max=0&filter_attr=0&page=1&sort=shop_price&order=ASC#goods_list"><img
                                                src="__PUBLIC__/Images/images/shop_price_default.gif" alt="按价格排序"></a>
                                    </div>
                                </form>
                            </div>
                        </if>
                        <div class="rightTitle_right">
                            {$data.show}
                        </div>
                    </div>
                    <div class=" searchRight_body">
                        <ul class="y_searchList clearfix">
                            <foreach name="data.goods" item="v" key="k">
                                <li class="li <if condition='($k+1)%5 eq 0'>Last</if>">
                                    <div class="item clearfix">
                                        <Div class="p_img"><a
                                                href="{:U(GROUP_NAME.'/Goods/index',array('id'=>$v['id']))}"><img
                                                src="{:U('/'.$v['img'])}" alt="{$v.name}"
                                                width="210" height="210" class="item_hd_{$v['id']}"/></a>
                                        </Div>
                                        <div class="goodsItem" style="margin-bottom:10px" id="goods_item{$k+1}">
                                            <div class="hds">
                                                <ul>
                                                    <foreach name="v.images" item="val">
                                                        <li class="on" data="hd_{$v['id']}"><a
                                                                href="javascript:void(0);"><img
                                                                src="{:U('/'.$val)}"
                                                                alt="{$v.name}" width="42" border="0"
                                                                title="{$v.name}"/></a></li>
                                                    </foreach>
                                                </ul>
                                            </div>
                                            <script type="text/javascript">
                                                $(function () {
                                                    var hd_tab = $('.hds ul li');
                                                    hd_tab.hover(function () {
                                                        var hd_tab = $(this).attr('data');
                                                        var hd_img = $('.item_' + hd_tab);
                                                        var hd_goodsimg = $(this).find('img').attr('src');
                                                        hd_img.attr('src', hd_goodsimg);
                                                        $(this).addClass('on').siblings('li').removeClass('on');
                                                    })
                                                })
                                            </script>
                                        </div>
                                        <p class="y_price">

                                            <em>￥{$v.shop_price}元</em>


                                            <font class="market_s">￥{$v.market_price}元</font>

                                        </p>
                                        <p class="y_proName"><a href="{:U(GROUP_NAME.'/Goods',array('id'=>$v['id']))}"
                                                                title="{$v.name}">{$v.name}</a></p>
                                        <p class="productStatus">
                                            <span>成交 <em>{$v.sale_num}笔</em></span>
                                        </p>
                                    </div>
                                </li>
                            </foreach>
                        </ul>
                    </div>
                    <div class="blank5"></div>
                    <script>
                        $(function () {
                            function Scroll2(id, l, r, auto) {
                                this.id = $("#" + id);
                                this.ul = this.id.find("ul");
                                this.li = this.ul.find("li");
                                this.l = this.id.find("." + l);
                                this.r = this.id.find("." + r);
                                this.auto = auto;
                                this.done = true;
                                var _this = this;
                                this.init.apply(this, arguments);

                            }

                            Scroll2.prototype = {
                                init: function () {
                                    this.ul.css("width", this.li.outerWidth() * this.li.length);
                                    this.event();
                                },
                                event: function () {
                                    var me = this;
                                    this.l.click(function () {
                                        if (!me.done || me.li.length < 5) return;
                                        me.done = !me.done;
                                        me.ul.animate({left: -me.li.outerWidth()}, "fast", function () {

                                            me.ul = me.id.find("ul");
                                            me.li = me.id.find("li");
                                            me.ul.append(me.li.eq(0));
                                            me.ul.css("left", 0);
                                            me.done = !me.done;
                                        });

                                    });
                                    this.r.click(function () {
                                        if (!me.done || me.li.length < 5) return;
                                        me.done = !me.done;
                                        me.ul = me.id.find("ul");
                                        me.li = me.id.find("li");
                                        me.li.eq(me.li.length - 1).insertBefore(me.li.eq(0));
                                        me.ul.css("left", -me.li.outerWidth()).animate({left: 0}, "fast", function () {
                                            me.done = !me.done;
                                        });
                                    });
                                }
                            }
                            $("li.li").each(function (i) {
                                new Scroll2("goods_item" + (i + 1), "proThumb-next", "proThumb-prev", false);
                            });

                        });
                    </script>
                    <script type="Text/Javascript" language="JavaScript">
                        function selectPage(sel) {
                            sel.form.submit();
                        }
                    </script>
                    <!--<div class="category">-->
                    <!--<p class="cate_title">掌柜热卖</p>-->
                    <!--<dl class="hot_list01">-->
                    <!--<dd>-->
                    <!--<div class="hot_img">-->
                    <!--<div class="pic"><a href="goods.php?id=1781"><img-->
                    <!--src="images/201611/thumb_img/1781_thumb_G_1479796768146.jpg" alt="阿胶"-->
                    <!--class="goodsimg"/></a></div>-->
                    <!--<div class="text">-->
                    <!--<p class="name"><a href="goods.php?id=1781" title="阿胶">阿胶</a></p>-->

                    <!--<p class="price"><font class="aa">-->

                    <!--￥580.33元-->


                    <!--</font> <font class="bb">￥580.33元</font></p>-->
                    <!--<div class="xiao_cat">-->
                    <!--销量：<em>0笔</em>-->
                    <!--</div>-->

                    <!--</div>-->
                    <!--</div>-->
                    <!--<div class="sucess_joinCart" id="addtocartdialog_retui_1781_hot"></div>-->
                    <!--</dd>-->
                    <!--</dl>-->
                    <!--</div>-->
                </div>
            </div>
        </div>
    </div>
    <else/>
    <div style="text-align: center">
        <div style="color: #000;font-size: 20px;font-weight: bold">无搜索商品,请重新选择</div>
        <img src="__PUBLIC__/Images/cart.jpg" alt="无搜索商品">
    </div>
</if>
{:W('Footer')}
</body>
</html>
